﻿
@helper TreeView( IEnumerable<MvcJE.Core.ListView.Menu> folders )
{
	foreach ( var folder in folders )
	{
		<li>
			@if ( folder.IsLeaf )
			{
				<span class="leaf @folder.Group" id="@folder.Id">@folder.Name</span> 
			}
			else
			{
				<span class="folder">@folder.Name</span>
				<ul>
					@TreeView( folder.SubMenu )
				</ul>
			}
		</li>
	}
}
